;**********************************
; some macro used to gdt table
; copyright 2014 (C) Brooks          
;**********************************


;%1 the base address 
;%2 the limit
;%3 Access right
;%4 
%macro  Descriptor 3
        dw      %2 & 0ffffh
        dw      %1 & 0ffffh
        db      (%1 >> 16) & 0ffh
        db      %3
        db      ((%2 >> 16) & 0fh) | 0xc0
        db      (%1 >> 24) & 0ffh
%endmacro


%macro  Descriptor1 3
        dw      %2 & 0ffffh
        dw      %1 & 0ffffh
        db      (%1 >> 16) & 0ffh
        db      %3
        db      ((%2 >> 16) & 0fh) | 0x00
        db      (%1 >> 24) & 0ffh
%endmacro